<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		<h1>[name]</h1>

		<div class="desc">
		Object for keeping track of time. This uses <a href="https://developer.mozilla.org/en-US/docs/Web/API/Performance/now">performance.now()</a>
		if it is available, otherwise it reverts to the less accurate <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now">Date.now()</a>.
		</div>


		<h2>Constructor</h2>


		<h3>[name]( [page:Boolean autoStart] )</h3>
		<div>
		autoStart — (optional) whether to automatically start the clock. Default is true.
		</div>

		<h2>Properties</h2>

		<h3>[property:Boolean autoStart]</h3>
		<div>
		If set, starts the clock automatically when the first update is called. Default is true.
		</div>

		<h3>[property:Float startTime]</h3>
		<div>
		Holds the time at which the clock's [page:Clock.start start] method was last called.
 		</div>


		<h3>[property:Float oldTime]</h3>
		<div>
		Holds the time at which the clock's [page:Clock.start start], [page:Clock.getElapsedTime getElapsedTime] or [page:Clock.getDelta getDelta]
		methods were last called.
 		</div>

		<h3>[property:Float elapsedTime]</h3>
		<div>
		Keeps track of the total time that the clock has been running.
 		</div>

		<h3>[property:Boolean running]</h3>
		<div>
		Whether the clock is running or not.
 		</div>


		<h2>Methods</h2>

		<h3>[method:null start]()</h3>
		<div>
		Starts clock. Also sets the [page:Clock.startTime startTime] and [page:Clock.oldTime oldTime]
		to the current time, sets [page:Clock.elapsedTime elapsedTime] to *0* and [page:Clock.running running] to *true*.
		</div>

		<h3>[method:null stop]()</h3>
		<div>
		Stops clock and sets [page:Clock.oldTime oldTime] to the current time.
		</div>

		<h3>[method:Float getElapsedTime]()</h3>
		<div>
		Get the seconds passed since the clock started and sets [page:Clock.oldTime oldTime] to the current time.<br />
		If [page:Clock.autoStart autoStart] is *true* and the clock is not running, also starts the clock.
		</div>

		<h3>[method:Float getDelta]()</h3>
		<div>
		Get the seconds passed since the time [page:Clock.oldTime oldTime] was set and sets [page:Clock.oldTime oldTime] to the current time.<br />
		If [page:Clock.autoStart autoStart] is *true* and the clock is not running, also starts the clock.
		</div>


		<h2>Source</h2>

		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
	</body>
</html>
